//这是一个学习抽象的Shape类
public class Rect extends Shape {
    private double length;
    private double width;

    public Rect(double length, double width) {
        this.length = length;
        this.width = width;
    }

    @Override
    public void draw() {
        System.out.println("矩形：" + "length = " + length +
                "width = " + width);
    }

    @Override
    void calArea() {
        System.out.println("矩形的面积 = " + length * width);
    }
}
